package com.yc.utils;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;

public class StringUtil {

	public static boolean checkNull(String ... strs) {
		if(null == strs || strs.length <= 0) {
			return true;
		}
		for(String str : strs) {
			if(null == str || "".equals(str)) {
				return true;
			}
		}
		return false;
	}
	
	public static void showMessageBox(Shell shell, String pwd) {
		MessageBox messageBox = new MessageBox(shell, SWT.NONE);
		messageBox.setMessage(pwd);
		messageBox.open();
	}
	
	public static String toString(Object obj) {
		if(null == obj) {
			return "";
		}
		return obj.toString();
	}
}
